package com.tianyi.sfzy1.mapper;

import com.tianyi.sfzy1.domain.Consultant;
import com.tianyi.sfzy1.domain.Consultationappointment;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
* @author Lenovo
* @description 针对表【consultant(咨询师表)】的数据库操作Mapper
* @createDate 2025-01-02 11:46:53
* @Entity com.tianyi.sfzy1.domain.Consultant
*/

public interface ConsultantMapper {

    int deleteByPrimaryKey(List<Integer> ids);

    int deleteConsultant(int id);

    int insert(Consultant record);

    int insertSelective(Consultant record);

    Consultant selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Consultant record);

    int updateByPrimaryKey(Consultant record);

    //登录
    Consultant login(String username, String password);

    List<Consultant> findAllConsultant();

    List<Consultant> findConsultantByCondition(@Param("realname") String realname,
                                               @Param("phone") String phone,
                                               @Param("gender") String gender,
                                               @Param("levelId") Integer levelId);
    //查询所有的咨询师
    List<Consultant> findAllConsultant2();


    Consultant findConsultantById(Integer id);

    //根据用户名查询咨询师id
    Consultant findByUsername(String username);

    //根据id修改密码
    int updatePassword(int consultantId, String password);

    //根据咨询师等级level_id和擅长领域specialization_id查询所有咨询师
    List<Consultant> findConsultantByLevelAndSpecialization(Integer level_id, Integer specialization_id);

    List<Consultant> findConsultantByFilters(@Param("area") String area,
                                             @Param("levelId") Integer levelId,
                                             @Param("gender") String gender,
                                             @Param("chargeTypeId") Integer chargeTypeId,
                                             @Param("tags") ArrayList<String> tags);

    List<Consultant> findConsultantcertificateById(Integer id);

//    根据id查询咨询师
    Consultant findById(int consultantId);

//    根据咨询师id修改咨询师信息
    int updateConsultant(int consultantId,String realname,String phone,int age,String gender);
//    根据用户名模糊查询咨询师
//    List<Consultant> findConsultantByUsername(String username);

//    根据咨询师id修改咨询师头像
    int updateConsultantAvatar(int consultantId,String avatar);
}
